/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * All Rights Researved.
 *
 * This library is developed and distributed for free usage,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * You can redistribute and/or modify it under the terms of the
 * Simplified BSD License
 *
 *
 *
 *
 *
 *
 *
 *
 * @Original Author: jin Chen
 * @date: Aug 27, 2003$
 * @version: 1.0
 */
package edu.psu.geovista.app.visualclassifier.classify.v2.colorpalette.v1;


import java.awt.*;

public class SelectPanel extends SwatchPanel {
     protected void initValues() {
        swatchSize = new Dimension(45,15);// UIManager.getDimension("ColorChooser.swatchesRecentSwatchSize");
	    numSwatches = new Dimension( 1, 1 );
        gap = new Dimension(3, 3);
        outlineSquare=true;
        this.setPreferredSize(swatchSize);
    }
     protected void initColors() {
        Color defaultRecentColor =Color.gray ;// UIManager.getColor("ColorChooser.swatchesDefaultRecentColor");
        int numColors = numSwatches.width * numSwatches.height;

	    colors = new Color[numColors];
	    for (int i = 0; i < numColors ; i++) {
	    colors[i] = defaultRecentColor;
	    }
    }
    public void setSelectedColor(Color c) {
        colors[0]=c;
        repaint();
    }
    public Color getSelectedColor() {
        return colors[0];

    }
}

